Home About

Clicking 'Start AVD' does nothing in Qt Creator on Windows



I followed Qt documentation's Getting Started with Qt for Android, everything was going well, exactly as the tutorial shows.

But then, when it came to starting the AVD, trouble came, the silent kind. Clicking on the connected device does nothing.

I gave up, because I was just curious. But then decided to try again, and luckily, I had the idea to debug Qt Creator, to see if something pops up and indicate what's wrong.

I opened the logs window (Tools -> Debug Qt Creator -> Show logs…), enabled info-output for the Android related stuff, and finally, clicking that button causes this log to show:
C:\Users\someUser\AppData\Local\Android\Sdk\emulator\emulator.exe -avd SecondExample
I tried to run that command in a CMD window, and finally (okay, to be honest, I did get this error in a dialog, but I ignored it because the SDK manager completed the installation) got an error:
INFO | Storing crashdata in: C:\Users\someUser\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db, detection is enabled for process: 4000
INFO | Android emulator version 34.2.14.0 (build_id 11834374) (CL:N/A)
INFO | Found systemPath C:\Users\someUser\AppData\Local\Android\Sdk\system-images\android-30\google_apis\x86_64\ v
INFO | Storing crashdata in: C:\Users\someUser\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db, detection is enabled for process: 1540
INFO | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
INFO | Increasing RAM size to 2048MB INFO | IPv4 server found: 192.168.1.1
INFO | Ignore IPv6 address: e0ae:3a90:5d01:0:20a2:3a90:5d01:0
INFO | Ignore IPv6 address: e0ae:3a90:5d01:0:20a2:3a90:5d01:0 (2x)
INFO | Ignore IPv6 address: f8b4:3a90:5d01:0:20a2:3a90:5d01:0
INFO | Ignore IPv6 address: f8b4:3a90:5d01:0:20a2:3a90:5d01:0 (2x)
INFO | Ignore IPv6 address: 40be:3a90:5d01:0:20a2:3a90:5d01:0 INFO | Ignore IPv6 address: 40be:3a90:5d01:0:20a2:3a90:5d01:0 (2x)
WARNING | Failed to process .ini file C:\Users\someUser\.android\avd\..\avd\SecondExample.avd\quickbootChoice.ini for reading.
ERROR | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator hypervisor driver is not installed on this machine
More info on configuring VM acceleration on Windows: https://developer.android.com/studio/run/emulator-acceleration#vm-windows
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration. what's the problem?
It's a scary long output, so I just threw it at ChatGPT, and it explained the problem:
The problem is that the Android Emulator on your machine requires hardware acceleration, but the necessary hypervisor driver is not installed or properly configured. The key part of the error message is:
ERROR | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator hypervisor driver is not installed on this machine

It then offered a few solutions, one is to Enable Virtualization in BIOS, which I already had enabled previously. Another is to Install Intel HAXM (Hardware Accelerated Execution Manager), but then…
Screenshot showing `Itel x86 Emulator Accelerator (HAXM installer) - Deprecated   7.6.5`
News to me, let's skip that.

Solution

And then ChatGPT suggested this:
Check and Install WHPX (Windows Hypervisor Platform):
If you are using a non-Intel CPU or prefer using WHPX, you can enable Windows Hypervisor Platform.
Go to “Control Panel” -> “Programs” -> “Turn Windows features on or off”.
Check “Windows Hypervisor Platform” and click OK.
Restart your computer if prompted.

Which was the fix for me.


Does the documentation include this detail?